package com.violet.controller.manager;

import com.violet.domain.dto.manager.MAdminDto;
import com.violet.domain.result.Result;
import com.violet.domain.vo.manager.AdminVo;
import com.violet.service.manager.MLoginService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/manager/admin")
@RequiredArgsConstructor
public class MAdminController {

    private final MLoginService service;

    @PostMapping("/login")
    public Result<AdminVo> login(@RequestBody MAdminDto dto) {
        return Result.success(service.login(dto), "登录");
    }

}
